home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / standards / ansi / X3T9 / area13 / dos_osd.txt < prev    next >
Encoding:
Text File  |  1992-05-12  |  10.1 KB  |  318 lines

  1.                                                                  
  2.                                                                
  3.                                                                 
  4. TO:        ALL
  5. FROM:    RON PERRY / SEAGATE
  6. DATE:    1/26/89
  7. RE:        DOS OSD SPECIFICATION
  8.  
  9. The following outlines some of my thoughts on the DOS OSD. All
  10. comments are welcome.
  11.  
  12. ----------------------------------------------------------------
  13.                         DOS OSD OVERVIEW
  14. ----------------------------------------------------------------
  15.  
  16. The OSD is responsible for the following:
  17.  
  18.     1 . Know the number of SCSI CAMs attached.
  19.  
  20.     2.    Know the number of SCSI buses attached.
  21.  
  22.     3.    Be able to associate a SCSI bus with a SCSI CAM.
  23.  
  24.     4.    Know the entry point of all SCSI CAMs.
  25.  
  26.     5.    Provide IOCTL support for the application SCSI I/O LIBRARY.
  27.  
  28. The DOS OSD is provided in the form of a DOS device driver.  It
  29. supports the following DOS functions:
  30.  
  31.                 - INIT
  32.                 - IOCTL INPUT
  33.                 - IOCTL OUTPUT
  34.  
  35. These functions are invoked through the normal DOS device driver
  36. STRATEGY and INTERRUPT routines.
  37.  
  38. In addition the OSD supports the following OSD/CAM functions:
  39.  
  40.                 - OSD INIT
  41.                 - OSD EP
  42.  
  43.  These functions are invoked through a software interrupt.
  44.  
  45. ----------------------------------------------------------------
  46.                         LOGICAL CONFIGURATION
  47. ----------------------------------------------------------------
  48.      _______________________________________________________
  49.     |                                                        |
  50.     |                        APPLICATION                        |
  51.     |                                                        |
  52.     |________________                                        |
  53.     |    SCSI I/O    |                                        |
  54.     |    LIBRARY        |                                        |
  55.     |_______________|_______________________________________|
  56.            | INT 21                | INT 21
  57.            | (IOCTL)            |
  58.      ______|____________________|___________________________
  59.     |                                                           |
  60.     |                            DOS                            |___
  61.     |                                                        |   |
  62.     |_______________________________________________________|   | FAR
  63.                | FAR                            | FAR            | CALL
  64.                | CALL                            | CALL            |
  65.      __________|____________         ___________|___________    |
  66.     |                        |        |                        |    |
  67.     |    DEVICE DRIVER        |        |    DEVICE DRIVER        |    |
  68.     |                        |        |                        |    |
  69.     |_______________________|        |_______________________|    |
  70.                |                                 |                |
  71.                |             S/W INT            |                |
  72.                 |________________________________|                |
  73.                                 |                                |
  74.      ___________________________|___________________________    |
  75.     |                                                        |    |
  76.     |                            OSD                            |___|
  77.     |                                                        |
  78.     |_______________________________________________________|
  79.             | FAR                | FAR                | FAR
  80.             | CALL                | CALL                | CALL
  81.      _______|_______     _______|_______     _______|_______
  82.      |                |    |                |    |                |
  83.     |       CAM        |    |      CAM        |    |      CAM        |
  84.     |_______________|   |_______________|   |_______________|
  85.     |                |    |        |        |    |                |
  86.     |       SCSI        |    | SCSI    | SCSI    |    |      SCSI        |
  87.     |       BUS        |    | BUS    | BUS    |    |      BUS        |
  88.     |_______________|   |_______|_______|   |_______________|
  89.  
  90.  
  91. ----------------------------------------------------------------
  92.                             OSD FUCNTIONS
  93. ----------------------------------------------------------------
  94.  
  95. INIT
  96. ----
  97.  
  98. The INIT command is invoked by DOS when the OSD is loaded.
  99. During initialization the OSD should
  100.  
  101.     - decode the command line and accept parameter information
  102.     - install the OSD interrupt service routine at the specified
  103.       software interrupt
  104.     - allocate memory for the specified number of CAM vectors
  105.     - set the number of units in the DOS request header to 0
  106.     - set the ending address of the resident program code in the
  107.       DOS request header
  108.     - set the status word in the DOS request header
  109.  
  110. IOCTL INPUT
  111. -----------
  112.  
  113. The IOCTL INPUT command is invoked by DOS as a result of a IOCTL
  114. service request from an application. An IOCTL service request
  115. will be generated by the following SCSI I/O LIBRARY functions:
  116.  
  117.     - To Be Supplied (TBS)
  118.  
  119. IOCTL OUTPUT
  120. ------------
  121.  
  122. The IOCTL OUTPUT command is invoked by DOS as a result of a
  123. IOCTL service request from an application. An IOCTL service
  124. request will be generated by the following SCSI LIBRARY
  125. functions:
  126.  
  127.     - DO_SCSI
  128.  
  129. The TRANSFER ADDRESS in the DOS request header contains a
  130. pointer to a CAM command block.
  131.  
  132. During IOCTL OUTPUT, the OSD should pass the CAM control block
  133. to the appropriate CAM. On return from the CAM module the OSD
  134. must set the return status in the DOS request header.
  135.  
  136. OSD INIT
  137. --------
  138.  
  139. The OSD INIT command is invoked by each CAM driver as it is
  140. loaded.  Each CAM module is provided in the form of a DOS device
  141. driver.  During initialization (INIT) each CAM should invoke the
  142. OSD INIT function (via the OSD software interrupt) with the
  143. following parameters:
  144.  
  145.     AX = 1 (OSD INIT function code)
  146.     ES:BX = pointer to the cam module entry routine
  147.     CX = number of SCSI buses attached
  148.  
  149. The pointer to the cam module is used by the OSD in building a
  150. vector table of CAM module entry points. A CAM command block
  151. received by the OSD EP command is vectored to the appropriate
  152. CAM module based on the path identifier in the CAM command
  153. block.
  154.  
  155. OSD EP
  156. ------
  157.  
  158. The OSD EP command is invoked by device drivers to request
  159. processing of a CAM command block. The CAM command block is
  160. vectored to the appropriate CAM based on the path identifer in
  161. the CAM command block. The OSD EP function is invoked (via the
  162. OSD software interrupt) with the following parameters:
  163.  
  164.     AX = 0 (OSD EP function code)
  165.     ES:BX = pointer to CAM command block
  166.  
  167. -----------------------------------------------------------------
  168.                         DOS CAM OVERVIEW
  169. -----------------------------------------------------------------
  170.  
  171. The CAM is responsible for the following:
  172.  
  173.     1 . Logging on to the DOS OSD
  174.  
  175.     2.    Processing a CAM command block.
  176.  
  177. The DOS CAM is provided in the form of a DOS device driver.  It
  178. supports the following DOS function:
  179.  
  180.                 - INIT
  181.  
  182. This function is invoked through the normal DOS device driver
  183. STRATEGY and INTERRUPT routines.
  184.  
  185. In addition the CAM supports the following CAM function:
  186.  
  187.                 - CAM EP
  188.  
  189. This function is invoked from the OSD via an intersegment (far)
  190. call.
  191.  
  192. ----------------------------------------------------------------
  193.                             CAM FUCNTIONS
  194. ----------------------------------------------------------------
  195.  
  196. INIT
  197. ----
  198.  
  199. The INIT command is invoked by DOS when the CAM is loaded.
  200. During initialization the CAM should
  201.  
  202.     - decode the command line and accept parameter information
  203.     - verify the presence of the DOS OSD
  204.     - log on to the DOS OSD - invoke OSD INIT
  205.     - initialize the CAM and HBAs to a ready and idle state
  206.     - set the number of units in the DOS request header to 0
  207.     - set the ending address of the resident program code in the
  208.       DOS request header
  209.     - set the status word in the DOS request header
  210.  
  211. During INIT, each CAM module must invoke OSD INIT via the
  212. specified software interrupt as follows:
  213.  
  214.     AX = 1 (OSD INIT function code)
  215.     ES:BX = pointer to CAM EP
  216.     CX = number of SCSI buses supported by this CAM
  217.  
  218. CAM EP
  219. ------
  220.  
  221. CAM EP is invoked by DOS OSD to request processing of a CAM
  222. command block. This is an intersegment (far) call with the
  223. following parameters:
  224.  
  225.     ES:BX = pointer to CAM command block
  226.  
  227. ----------------------------------------------------------------
  228.                         PHYSICAL CONFIGURATION
  229. ----------------------------------------------------------------
  230.      _______________________________________________________
  231.     |                                                        |
  232.     |                    INTERRUPT VECTORS                    |
  233.     |_______________________________________________________|
  234.     |                                                        |
  235.     |                    BIOS DATA AREA                        |
  236.     |_______________________________________________________|
  237.     |                                                           |
  238.     |                        DOS                                |
  239.     |_______________________________________________________|
  240.     |                                                        |
  241.     |                        DOS OSD                            |
  242.     |_______________________________________________________|
  243.      |                                                        |
  244.     |                        CAM                                |
  245.     |_______________________________________________________|
  246.      |                                                        |
  247.     |                        CAM                                |
  248.     |_______________________________________________________|
  249.      |                                                        |
  250.     |                        CAM                                |
  251.     |_______________________________________________________|
  252.      |                                                        |
  253.     |                    DEVICE DRIVER                        |
  254.     |_______________________________________________________|
  255.      |                                                        |
  256.     |                    DEVICE DRIVER                        |
  257.     |_______________________________________________________|
  258.     |                                                        |
  259.     |                    APPLICATION                            |
  260.     |                                                        |
  261.     |________________                                        |
  262.     |    SCSI I/O    |                                        |
  263.     |    LIBRARY        |                                        |
  264.     |_______________|_______________________________________|
  265.     |                                                        |
  266.     |                    SYSTEM ROM                            |
  267.     |_______________________________________________________|
  268.  
  269. ----------------------------------------------------------------
  270.                         IMPLEMENTATION
  271. ----------------------------------------------------------------
  272.  
  273. Under MSDOS, both the DOS OSD and all CAM modules are
  274. implemented as pseudo device drivers. Device drivers request CAM
  275. services by passing a CAM command block to the DOS OSD which
  276. directs the command block to the appropriate CAM module.
  277.  
  278. DOS OSD and CAM modules are specified in the DOS CONFIG.SYS
  279. file. Only one DOS OSD module can be present in the system. The
  280. number of CAM modules is limited by the size of the PATH
  281. variable in the CAM command block (TBS).
  282.  
  283. The DOS OSD must be specified in the CONFIG.SYS file, before any
  284. CAM modules. Likewise, all CAM modules must be specified in the
  285. CONFIG.SYS file before any device drivers which require CAM services.
  286.  
  287. Command line arguments provide the DOS OSD and the CAM modules
  288. with configuration parameters. DOS OSD accepts arguments as
  289. follows: 
  290.  
  291.     /Cn - where n represents the number of CAM modules.
  292.     /In    - where n is the DOS OSD software interrupt number.
  293.  
  294. CAM modules accept arguments as follows:
  295.  
  296.     /Pn m - where n represents a logical HBA number (base 0)
  297.             and m represents the base i/o port for the HBA.
  298.     /Qn m - where n represents a logical HBA number (base 0)
  299.             and m represents the IRQ number.
  300.     /Dn m - where n represents a logical HBA number (base 0)
  301.             and m represents the DMA channel number.
  302.     /Hn m - where n represents a logical HBA number (base 0)
  303.             and m represents the HOST ID number.
  304.     /In   - where n is the DOS OSD software interrupt number.
  305.  
  306. The DOS OSD and all CAM modules must specify the same software
  307. interrupt number (/I parameter). The default DOS OSD software
  308. interrupt is 58 (hex).
  309.  
  310. The provider of the DOS OSD must use the follow name in the
  311. device header name field:
  312.  
  313.     _DOS_OSD
  314.  
  315. This allows independent CAM module providers and device driver
  316. providers to verify the presence of the DOS OSD prior to
  317. invoking the DOS OSD software interrupt.